package cn.huiyunche.base.service.enums;

/**
 * @ClassName: PaymentStatusEnum
 * @Description: 客户订单和运单付款状态
 * @author: Aaron
 * @date: 2016年5月30日 下午1:41:21
 */
public enum PaymentStatusEnum {
    UNPAID(10, "未付款"),
    WAIT_PAYMENT(20, "待支付"),
    ALREADY_PAID(30, "已付款");

    private final int value;
    private final String text;

    PaymentStatusEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static PaymentStatusEnum getByValue(int value) {
        for (PaymentStatusEnum temp : PaymentStatusEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
